#include "repo_res_texture.h"
#include "image/image_loader.h"
#include "fileio/fileio.h"
#include "G.h"

namespace renderit
{
	namespace messiah
	{
		repo_res_texture::~repo_res_texture()
		{
			if (image_)
			{
				delete image_;
			}
			image_ = nullptr;
		}

		void repo_res_texture::load()
		{
			if (G->get_argument("find_similar_textures") == "true")
			{
				image_ = image::load_tga(fileio::join(dir_, "source.tga"));
			}
		}
	}
}